#include <WinTen.h>
#include <Windows.h>
#include <ClipApi.h>

//----------------------------------------------------------------------------//

CLIPPER SETSCROLLR() // ANGE
{
   SetScrollRange( _parni( 1 ),         // its hWnd
                   _parni( 2 ),         // Scroll Bar flags
                   _parni( 3 ),         // Min
                   _parni( 4 ),         // Max
                   _parl( 5 ) );        // ReDraw
}

//----------------------------------------------------------------------------//

CLIPPER SETSCROLLP() // OS
{
   _retni( SetScrollPos( _parni( 1 ),    // its hWnd
                         _parni( 2 ),    // Scroll Bar flags
                         _parni( 3 ),    // new Position
                         _parl( 4 ) ) ); // repaint
}

//----------------------------------------------------------------------------//

CLIPPER GETSCROLLR() // ANGE
{
   WORD wMin = 0, wMax = 0;

   GetScrollRange( _parni( 1 ),           // its hWnd
                   _parni( 2 ),           // Scroll bar flags
                   &wMin,
                   &wMax );
   _reta( 2 );                            // { nMin, nMax }
   _storni( wMin, -1, 1 );
   _storni( wMax, -1, 2 );
}

//----------------------------------------------------------------------------//

CLIPPER GETSCROLLP() // OS
{
   _retni( GetScrollPos( _parni( 1 ),     // its hWnd
                         _parni( 2 ) ) ); // Scroll bar flags
}

//----------------------------------------------------------------------------//
